﻿using Omes.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using Omes.Model;

namespace Omes.Test
{
    
    
    /// <summary>
    ///This is a test class for DbServerTest and is intended
    ///to contain all DbServerTest Unit Tests
    ///</summary>
    [TestClass()]
    public class DbServerTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for GetBarConents
        ///</summary>
        [TestMethod()]
        public void GetBarConentsTest()
        {
            DbServer target = new DbServer(); // TODO: Initialize to an appropriate value
            List<Dictionary<string, string>> expected = null; // TODO: Initialize to an appropriate value
            List<Dictionary<string, string>> actual;
            actual = target.GetBarConents();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetPageTypes
        ///</summary>
        [TestMethod()]
        public void GetPageTypesTest()
        {
            DbServer target = new DbServer(); // TODO: Initialize to an appropriate value
            int id = 2; // TODO: Initialize to an appropriate value
            List<PageType> expected = null; // TODO: Initialize to an appropriate value
            List<PageType> actual;
            actual = target.GetPageTypes(id);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for UpdateHtml
        ///</summary>
        [TestMethod()]
        public void UpdateHtmlTest()
        {
            DbServer target = new DbServer(); // TODO: Initialize to an appropriate value
            int id = 18; // TODO: Initialize to an appropriate value
            string title = "ssss"; // TODO: Initialize to an appropriate value
            string content = "<a></a>"; // TODO: Initialize to an appropriate value
            string commend = "cccccccc"; // TODO: Initialize to an appropriate value
            int weight = 2; // TODO: Initialize to an appropriate value
            string describe = "xxxx"; // TODO: Initialize to an appropriate value
            string blockName = "xxxx"; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.UpdateHtml(id, title, content, commend, weight, describe, blockName);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for AddLoinRecord
        ///</summary>
        [TestMethod()]
        public void AddLoinRecordTest()
        {
            DbServer target = new DbServer(); // TODO: Initialize to an appropriate value
            int userId = 1; // TODO: Initialize to an appropriate value
            string loginIp = "10.10"; // TODO: Initialize to an appropriate value
            DateTime dateTime = DateTime.Now; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.AddLoinRecord(userId, loginIp, dateTime);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetCurrentLoginRecord
        ///</summary>
        [TestMethod()]
        public void GetCurrentLoginRecordTest()
        {
            DbServer target = new DbServer(); // TODO: Initialize to an appropriate value
            LoginRecord expected = null; // TODO: Initialize to an appropriate value
            LoginRecord actual;
            actual = target.GetCurrentLoginRecord();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
